import socket
s = socket.socket(.AF_INET,socket.SOCK_STREAM)
s.bind(('127.0.0.1',8001))
str = input("请输入要传输的内容：")
s.sendall(str.encode())
data = s.recv(1024)
print(data.decode())
s.close()